/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.coupon.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ykht.proj.common.core.util.R;
import com.ykht.proj.coupon.entity.CnCompany;
import com.ykht.proj.coupon.vo.CnCompanyVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 公司表
 *
 * @author proj code generator
 * @date 2020-11-17 14:05:06
 */
public interface CnCompanyService extends IService<CnCompany> {

	Map uploadFile(MultipartFile file);

	/**
	 * 根据角色类型 获取后台的公司列表 分页查询
	 *
	 * @param page
	 * @param cnCompany
	 * @return
	 */
	IPage<CnCompanyVo> getCnCompanyPage(Page page, CnCompany cnCompany);

	/**
	 * 新增公司表
	 *
	 * @param cnCompanyVo
	 */
	R saveAndUser(CnCompanyVo cnCompanyVo) throws Exception;

	/**
	 * 修改公司表
	 *
	 * @param cnCompanyVo
	 * @return
	 */
	R updateAndUser(CnCompanyVo cnCompanyVo) throws Exception;

	/**
	 * 公司上下架
	 *
	 * @param cnCompanyVo
	 * @return
	 */
	R updateByDisplay(CnCompanyVo cnCompanyVo) throws Exception;

}
